﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Web.Mvc;

namespace SportsStore.Domain.Entities
{
    [MetadataType(typeof(ImageMetadataSource))]
    public partial class Image
    {
       
    }

    class ImageMetadataSource
    {
        [HiddenInput(DisplayValue = false)]
        public int Id { get; set; }

        [Required(ErrorMessage = "Please enter Image Name")]
        public string Name { get; set; }

        [Required]
        [HiddenInput(DisplayValue = false)]
        public string MimeType { get; set; }

        [Required]
        public bool IsDefault { get; set; }

        [Required]
        public byte Ranking { get; set; }

        [Required]
        public int CategoryId { get; set; }

        [Required]
        public int ProductId { get; set; }
    }
}
